package io.ooad.jenkins.shuren;

/**
 * 用于将用户登录后获取的Access token存取到ThreadLocal中。
 * Created by yyang on 2017/1/2.
 */
public final class AuthHolder {

    private static ThreadLocal<String> authToken = new ThreadLocal<>();

    public static void set(String auth) {
        authToken.set(auth);
    }

    public static String get() {
        return authToken.get();
    }

    public static void clear() {
        authToken.remove();
    }
}
